import request from '@/utils/request';
const BASE_URL = 'http://101.200.59.101/';

export async function queryNews(page_size, page_num, keyword = '') {
  return request(
    `/api/gold/exclusive_headline?page_size=${page_size}&page_num=${page_num}&keyword=${keyword}`,
    { page_size, page_num, keyword }
  );
}

export async function queryReports(page_size, page_num, api_type = '', keyword = '') {
  return request(
    `/api/gold/industry_research?page_size=${page_size}&page_num=${page_num}&api_type=${api_type}&keyword=${keyword}`,
    { page_size, page_num, api_type, keyword }
  );
}

export async function queryZzds(page_size, page_num, keyword = '') {
  return request(
    `/api/gold/wealth_knows?page_size=${page_size}&page_num=${page_num}&keyword=${keyword}`,
    { page_size, page_num, keyword }
  );
}

export async function getDetail(payload) {
  return request(`/api/gold/public_detail_info?id=${payload.id}&api_type=${payload.api_type}`, {
    method: 'GET',
    ...payload,
  });
}
